#include <iostream>
#include <algorithm>
#include <cstdio>
using namespace std;
const int N = 1e5 + 5;
int n, r[N], cnt[N], rcnt[N], rm = 0, ans = 0;
int main() {
    freopen("duel.in", "r", stdin);
    freopen("duel.out", "w", stdout);
    cin >> n;
    ans = n;
    for (int i = 1; i <= n; i++) cin >> r[i], cnt[r[i]]++, rcnt[r[i]]++;
    sort(r + 1, r + 1 + n);
    for (int i = 2; i <= n; i++)
        if (r[i] > r[i - 1]) {
            rm += rcnt[r[i - 1]];
            if (cnt[r[i]] >= rm) {
                ans -= rm;
                cnt[r[i]] -= rm;
                rm = 0;
            } else {
                ans -= cnt[r[i]];
                rm -= cnt[r[i]];
                cnt[r[i]] = 0;
            }
        }
    cout << ans << '\n';
    return 0;
}